/**
 * elancom Corporation copy right 2012 - 2015  
 *   
 * $Header: https://192.168.1.224/svn/elancom/product/elancom-platform/trunk/src/main/java/com/elancom/framework/commons/json/parser/Keywords.java 1034 2012-07-02 03:09:12Z lanzhouxue $
 * $Id: Keywords.java 1034 2012-07-02 03:09:12Z lanzhouxue $
 * $Author: lanzhouxue $
 * $Date: 2012-07-02 11:09:12 +0800 (Mon, 02 Jul 2012) $
 * $Revision: 1034 $
 */
package com.elancom.framework.commons.json.parser;

import java.util.HashMap;
import java.util.Map;

/**
 * @author elancom
 */
public class Keywords {

	private final Map<String, Integer> keywords;

	public static Keywords DEFAULT_KEYWORDS;

	static {
		final Map<String, Integer> map = new HashMap<String, Integer>();
		map.put("null", JSONToken.NULL);
		map.put("new", JSONToken.NEW);
		map.put("true", JSONToken.TRUE);
		map.put("false", JSONToken.FALSE);
		DEFAULT_KEYWORDS = new Keywords(map);
	}

	public Keywords(Map<String, Integer> keywords) {
		this.keywords = keywords;
	}

	public Integer getKeyword(String key) {
		return keywords.get(key);
	}

}
